package com.aaa.dao;

import com.aaa.entity.Order;
import com.aaa.entity.OrderInfo;
import com.aaa.entity.YearsAndMonthsCountForOrder;

import java.util.List;

public interface OrderDao {

    int updateOrderByOrderId(Order order);

    int updateVerifyOrderByOrderId(Integer orderId, Integer status);

    int getAllOrderInfoCount(Integer orderId,Integer cardId);

    List<Order> findAllOrder(Integer pageNumber, Integer pageSize, Integer orderId, Integer cardId);

    List<Order> findOrderByOrderId(int orderId);

    List<Order> findOrderByCardId(int cardId);

    int addOrder(Order order);
	
	   /**
     * 充值统计
     * @return
     */
    public List<YearsAndMonthsCountForOrder> getOrderNearYearMonthsCount();

    /**
     * 提交订单更新order表
     * @param order
     * @return
     */
    public int insertIntoOrder(Order order);

    /**
     * 提交订单更新orderinfo表
     * @param orderInfo
     * @return
     */
    public int insertIntoOrderinfo(OrderInfo orderInfo);

    /**
     * 减去用户提交订单后的余额
     * @param cardId
     * @param money
     * @return
     */
    public int minusCardAmount(int cardId,double money);


}